package cn.walls1717.wallsmall.product.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import cn.walls1717.wallsmall.common.utils.R;
import cn.walls1717.wallsmall.product.feign.fallback.SeckillFeignServiceFallBack;

/**
 * 远程调用seckill秒杀服务
 *
 * @author walls1717
 * @since 2022/11/27 10:54
 **/
@FeignClient(value = "wallsmall-seckill", fallback = SeckillFeignServiceFallBack.class)
public interface SeckillFeignService {

    /**
     * 根据skuId获取相关的秒杀信息
     *
     * @param skuId skuId
     * @return 秒杀信息
     */
    @GetMapping("/sku/seckill/{skuId}")
    R getSkuSeckillInfoBySkuId(@PathVariable("skuId") Long skuId);

}
